<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var salary = 10000;
        for (var i = 1; i <= 50; i++) {
            salary += salary * 0.05;
        } console.log(salary); 
    </script>

    <!-- <script>
        function salary() {
            var money = 10000 //初始工资
            for (var i = 1; i < 50; i++) {
                money += (money * 0.05) //初始工资乘涨幅等于，涨的工资
            }
            console.log(money)
        }
        salary()
    </script> -->

</body>


</html>